Tables are being removed when the diff adds ins or del tags wrapping tbody/thead/tfoot tags#21
Open
stefanbrand-rldatix wants to merge 4 commits intomasterfrom
Open
Tables are being removed when the diff adds ins or del tags wrapping tbody/thead/tfoot tags#21stefanbrand-rldatix wants to merge 4 commits intomasterfrom
ins or del tags wrapping tbody/thead/tfoot tags#21stefanbrand-rldatix wants to merge 4 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes an HTML diff cleanup edge case where tables could lose their contents when <ins>/<del> wraps table section elements (<tbody>, <thead>, <tfoot>), by ensuring those change markers get pushed down into <td>/<th> instead of remaining at invalid table-structure levels.
Changes:
- Extend table cleanup to internalize/distribute
<ins>/<del>for<tbody>/<thead>/<tfoot>(and also<tr>) so markers end up inside cells. - Add comprehensive regression tests covering
tbody/thead/tfootwrapped byins/del, plus paireddel+insinternalization cases. - Bump package version to
0.3.1.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
setup.py |
Version bump for the release including the table diff fix. |
htmltreediff/html.py |
Updates fix_tables() to internalize/distribute change markup for table section elements and rows before final cleanup. |
htmltreediff/test_html.py |
Adds regression tests covering the table-section-wrapped ins/del scenarios and internalization behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Author
|
All tests pass locally |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Include the
tbody/thead/tfoottags in thefix_tablesclean up to move theinsanddeltags inside thetdandthtags. This prevents the complete removal of the table contents in these cases.